package com.smh.a01IOStreamDemo1;

import java.io.FileOutputStream;
import java.io.IOException;

public class IOStreamDemo2 {
    public static void main(String[] args) throws IOException {

        //如果存在,那么会清空文件
        FileOutputStream fos = new FileOutputStream("day26-code\\file\\a.txt");
        byte[] bytes = {'a', 'q', 'z', '3', '2', '6'};

        fos.write(bytes);
        fos.write(' ');
        //从0索引开始,写入3个.
        fos.write(bytes, 0, 4);
        fos.close();


    }
}
